import { NextRequest, NextResponse } from "next/server";
import prisma from "@/db";
export const GET = async (
  req: NextRequest,
  { params }: { params: { id: string } }
) => {
  const data = await prisma.goods.findUnique({
    where: {
      id: params.id,
    },
  });
  return NextResponse.json({
    success: true,
    errorMessage: "获取成功",
    data,
  });
};
